﻿using System;
using System.Collections.Generic;
using System.Text;
using SkinEngines.Win32;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

namespace SkinEngines.SkinForm
{
    /// <summary>
    /// Dialog Extenders
    /// </summary>
    public static class DialogExtenders
    {
        /// <summary>
        /// Calculates the border size for the given form.
        /// </summary>
        /// <param name="form">The form.</param>
        /// <returns></returns>
        public static Size GetBorderSize()
        {
            Size border = new Size(0, 0);

            border = SystemInformation.FixedFrameBorderSize;

            return border;
        }

        /// <summary>
        /// Gets the height of the caption.
        /// </summary>
        /// <param name="form">The form.</param>
        /// <returns></returns>
        public static int GetCaptionHeight()
        {
            return SystemInformation.CaptionHeight + 2;
        }

        /// <summary>
        /// Gets the size for <see cref="CaptionButton"/> the given form.
        /// </summary>
        /// <param name="form">The form.</param>
        /// <returns></returns>
        public static Size GetCaptionButtonSize()
        {
            Size buttonSize = SystemInformation.CaptionButtonSize;
            // looks better with this height
            buttonSize.Height--;
            return buttonSize;
        }
    }
}
